package com.mayisoftware.mayioa.business.personal.impl.dao;

import com.mayisoftware.mayioa.business.personal.api.domain.PersonalSign;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 查询报名信息Mapper
 */
@Mapper
public interface PersonalSignMapper {
    /**
     * 根据用户ID查询报名信息
     */
    List<PersonalSign> selectSignListByUserId(@Param("userId") Integer userId);

    /**
     * 添加报名信息
     */
    int insertSignInfo(PersonalSign sign);

    /**
     * 查询计划加入信息根据计划ID，用来校验计划是否使用
     */
    List<PersonalSign> selectASingByPlanId(@Param("planId") Integer planId);

    int updateUser(PersonalSign sign);

    /**
     * 查询申请信息
     */
    List<PersonalSign> selectApplyInfo(PersonalSign personApply);
}
